﻿<phone:PhoneApplicationPage
    x:Class="Techdays2013.AppToAppPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"

    mc:Ignorable="d"
    xmlns:behaviors="clr-namespace:SamuelBlanchard.Accessibility" 
    
    behaviors:SpeechBehavior.CanSpeak="True"
    behaviors:SpeechBehavior.Language="fr-FR"
    
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    toolkit:TiltEffect.IsTiltEnabled="True"
    shell:SystemTray.IsVisible="True"  
    >

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">

        <ScrollViewer ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Auto">
            <StackPanel Margin="6">

                <Border Height="173" VerticalAlignment="Top"  Background="Green" Margin="6">
                    <StackPanel Margin="12" VerticalAlignment="Center">
                        <TextBlock behaviors:SpeechBehavior.Language="en-US" Text="App-To-App" FontSize="50" FontFamily="Segoe WP light" HorizontalAlignment="Center" Margin="12,0"/>
                    </StackPanel>
                </Border>

                <StackPanel Margin="6,6,6,0">

                    <!-- App system -->
                    <toolkit:ExpanderView Margin="0,0,0,6" IsExpanded="True">
                        <toolkit:ExpanderView.Header>
                            <Grid Background="DodgerBlue" Width="458">

                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    <ColumnDefinition Width="*"></ColumnDefinition>
                                </Grid.ColumnDefinitions>

                                <Image Grid.Column="0" VerticalAlignment="Center"  Source="/Assets/Icons/Mobile.png" Height="48"></Image>
                                <TextBlock Grid.Column="1" VerticalAlignment="Center" Foreground="White" Text="Jetée d'App système"></TextBlock>
                            </Grid>

                        </toolkit:ExpanderView.Header>

                        <toolkit:ExpanderView.Items>

                            <toolkit:ListPicker x:Name="ListPickerAppSystem" ItemsSource="{Binding MsSettings}">
                            </toolkit:ListPicker>

                            <TextBlock Margin="12,12,0,0" HorizontalAlignment="Left" VerticalAlignment="Center" Foreground="{StaticResource PhoneSubtleBrush}" Text="Protocole"></TextBlock>
                            <TextBlock Margin="0,0,0,24" FontSize="25" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White" Text="{Binding SelectedItem.Tag, ElementName=ListPickerAppSystem}"></TextBlock>

                            <Button Style="{StaticResource ButtonMetro}" HorizontalAlignment="Center" Margin="0,0,0,12" Background="Green" Content="Lance-moi !" Click="Button_Click_AppSystem"></Button>

                        </toolkit:ExpanderView.Items>

                    </toolkit:ExpanderView>

                    <!-- Association URI  -->
                    <toolkit:ExpanderView Margin="0,0,0,6" IsExpanded="False">
                        <toolkit:ExpanderView.Header>
                            <Grid Background="Orange" Width="458">

                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                                    <ColumnDefinition Width="*"></ColumnDefinition>
                                </Grid.ColumnDefinitions>

                                <Image Grid.Column="0" VerticalAlignment="Center"  Source="/Assets/Icons/Mobile.png" Height="48"></Image>
                                <TextBlock Grid.Column="1" VerticalAlignment="Center" Foreground="White" Text="Association de malfaiteurs (URI)"></TextBlock>
                            </Grid>

                        </toolkit:ExpanderView.Header>

                        <toolkit:ExpanderView.Items>

                            <toolkit:ListPicker x:Name="ListPickerCustomProtocols" ItemsSource="{Binding CustomProtocols}">
                            </toolkit:ListPicker>

                            <TextBlock Margin="12,12,0,0" HorizontalAlignment="Left" VerticalAlignment="Center" Foreground="{StaticResource PhoneSubtleBrush}" Text="Protocole"></TextBlock>
                            <TextBlock Margin="12,0,12,24" TextWrapping="Wrap" FontSize="25" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White" Text="{Binding SelectedItem.Tag, ElementName=ListPickerCustomProtocols}"></TextBlock>

                            <Button Style="{StaticResource ButtonMetro}" HorizontalAlignment="Center" Margin="0,0,0,12" Background="Green" Content="Démarre !" Click="Button_Click_CustomProtocol"></Button>

                        </toolkit:ExpanderView.Items>

                    </toolkit:ExpanderView>

                </StackPanel>

            </StackPanel>

        </ScrollViewer>

        <Grid x:Name="GridFade" Background="Black" Visibility="Collapsed">
        </Grid>

    </Grid>

</phone:PhoneApplicationPage>